package com.aptemo.webetek.client.commands.responses;

import java.util.ArrayList;

import com.aptemo.webetek.shared.UserBean;
import com.google.gwt.user.client.rpc.AsyncCallback;

public abstract class GotPlayersList implements AsyncCallback<ListResponse<UserBean>>
{

	@Override
	public void onFailure(Throwable caught)
	{
		onError(caught.getLocalizedMessage());
	}

	@Override
	public void onSuccess(ListResponse<UserBean> result)
	{
		got(result.getList());
	}

	public abstract void got(ArrayList<UserBean> list);

	public abstract void onError(String message);

}
